<template>
	<view>
		<!-- 顶部面板背景 一直能用 -->
		<view class="top">

		</view>
		<view v-for="(item,index) in evaluateList">
			<uni-card style="position: relative; top: -320rpx; border-radius: 30rpx;">
				<view
					style="margin: 30rpx 5rpx;padding-bottom: 14rpx; border-bottom: 12rpx solid #f7f7f7; display: flex; justify-content: space-evenly;">
					<span style="font-size: 36rpx; color: black;font-weight: 500;">张女士</span>
					<u-button @click="todetail(item.id)"
						style="width: 180rpx; height: 52rpx; border-radius: 100rpx; background-color: #0863e7;color: #fff; margin-right: -10rpx; margin-top: -10rpx;">查看详情</u-button>
				</view>
				<view>
					<view style="font-size: 32rpx; color:#2f81fa ; margin-bottom: 20rpx;">订单编号:202115060691</view>
					<view style="display: flex; color: black; margin-bottom: 10rpx;">综合评价: {{item.star}}分
						<u-rate style="margin-right:14rpx ; margin-left: 18rpx;" active-color="#ffc100" gutter="0"
							v-model="item.star"></u-rate>
					</view>
					<view style="font-size: 26rpx; font-weight: 300;">评价时间: {{item.commentTime}}</view>
				</view>

			</uni-card>

		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				rate: 3,
				formData: [],
				shopId: '',
				evaluateList: []
			};
		},
		onLoad() {
			this.shopId = uni.getStorageSync("shopId");
			console.log(this.shopId)
			this.getList()
		},
		methods: {
			todetail(id) {
				uni.navigateTo({
					url: '../hjjyiwancheng/hjjyiwancheng?id=' + id
				});
			},
			getList() {
				let that = this
				this.$http({
					url: '/api/order/evaluate/list/shopId?shopId=' + this.shopId,
					method: 'get',
					success(res) {
						that.evaluateList = res.data.rows
						console.log(that.evaluateList)
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.top {
		padding-right: 20rpx;
		padding-left: 20rpx;
		height: 240rpx;
		background-color: #2f81fa;
		padding-top: 60rpx;
	}
</style>